<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/11 0011
 * Time: 下午 2:34
 */
namespace app\common\validate;

class WithdrawPay extends BaseValidate{
    protected $rule = [
        'orderNo' => 'require|isNotEmpty',
        'type' => 'require|checkType',
        'userId' => 'require|isNotEmpty'
    ];

    protected $message = [
        'phone' => '缺少订单号!',
        'type' => '参数错误',
        'userId' => '用户参数错误'
    ];

    protected function checkType($value){
        if($value == 1 || $value ==2){
            return true;
        }
        return false;
    }
}